package com.service.serviceImpl;


import com.dao.StudentDao;
import com.pojo.Student;
import com.service.StudentService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService {
    StudentDao dao;
    List<Student> list;
    Student student;

    @Override
    public List<Student> query() {
        list= dao.query();
        return list;
    }

    public void add(Student student) {
        dao.add(student);
    }

    @Override
    public void del(Integer id) {
        dao.del(id);
    }

    @Override
    public void update(Student student) {
        dao.update(student);
    }

    @Override
    public Student queryById(Integer id) {
        student= dao.queryById(id);
        return student;
    }
}
